package com.hub.realtime.resource.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hub.realtime.common.annotation.Excel;
import com.hub.realtime.common.core.domain.BaseEntity;

/**
 * 项目管理表对象 res_application
 *
 * @author wupeng
 * @date 2022-01-05
 */
@Data
@TableName("res_application")
public class ResApplication extends BaseEntity<ResApplication>
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value="id", type= IdType.AUTO)
    private Long id;

    /** 项目名称 */
    @TableField("name")
    @Excel(name = "项目名称")
    private String name;

    /** 描述信息 */
    @TableField("description")
    @Excel(name = "描述信息")
    private String description;

    /** 用户的随机code */
    @TableField("user_uid")
    private String userUid;


    /** 所属的集群ID */
    @TableField("cluster_id")
    @Excel(name = "所属的集群ID")
    private Long clusterId;

    @TableField("user_id")
    private Long userId;

    /** 随机code */
    @TableField("uid")
    private String uid;

    @TableField("remark")
    private String remark;

    @TableField("in_use")
    private boolean inUse;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("description", getDescription())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("userUid", getUserUid())
                .append("createBy", getCreateBy())
                .append("clusterId", getClusterId())
                .append("uid", getUid())
                .append("remark", getRemark())
                .toString();
    }
}
